package com.jieshuibao.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jieshuibao.mapper.QuestionUserExMapper;
import com.jieshuibao.mapper.QuestionUserMapper;
import com.jieshuibao.model.db.QuestionSecretly;
import com.jieshuibao.model.db.QuestionUserEx;
import com.jieshuibao.model.db.QuestionUserExample;
import com.jieshuibao.model.db.QuestionUserKey;

@Service
public class QuestionUserService {
	@Resource
	private QuestionUserMapper questionUserMapper;
	@Resource
	private QuestionUserExMapper questionUserExMapper;
	//根据id查询
	public QuestionUserKey getQuestionUserKeys(QuestionUserKey questionUserKey){
		return questionUserExMapper.selectQuestionByUuidAndPhone(questionUserKey);
	}
	//查询偷看数量
	public int countUser(QuestionUserExample questionUserExample) {
		return questionUserMapper.countByExample(questionUserExample);
	}
	//添加偷看关系表
	public void addSelective(QuestionUserKey record) {
		questionUserMapper.insertSelective(record);
	}
	//我的清单里的偷偷看列表
	public List<QuestionUserEx> getPageByNum(QuestionSecretly questionSecretly ){
		return questionUserExMapper.selectPageByNum(questionSecretly);
	}
	
}
